const mongoose = require("../config/db");
const LogsSchema = mongoose.Schema({
  username: {
    type: String,
    required: true,
    minlength: 2,
    maxlength: 12
  },
  ip: {
    type: String,
    default: ""
  },
  create_time: {
    type: Date,
    default: Date.now
  },
  update_time: {
    type: Date,
    default: Date.now
  }
},
  {
    versionKey: false,
    timestamps: { createdAt: "create_time", updatedAt: "update_time" }
  }
)
const LogsModel = mongoose.model("Logs", LogsSchema, "logs");
module.exports = LogsModel;